Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transparently handle Base64 encoding #29

Merged
merged 3 commits into from
Jun 16, 2016
Merged

Conversation

brendanhay
Copy link
Owner

@brendanhay brendanhay commented Jun 14, 2016

The external lens interface for fields that were previously of type bytes :: [Word8] now allows the user to exclusively pass/retrieve an unencoded ByteString which is then wrapped in a Base64 newtype internally, to ensure the correct Base64URL encoding occurs.

For any list-like occurences, _Coerce is used identically to other wrapped internal isos - assumed to be zero-cost.

This fixes issue #26, with the signatures of lenses changing from:

someField :: Lens' SomeRecord [Word8]   

To the new interface which you pass unencoded data:

someField :: Lens' SomeRecord ByteString

@brendanhay brendanhay merged commit 623eefc into develop Jun 16, 2016
@brendanhay brendanhay deleted the feature/base64-encoding branch June 16, 2016 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant